home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / src / libgplus.5 / libio / tests / makefile.in < prev    next >
Encoding:
Makefile  |  1993-10-04  |  5.2 KB  |  176 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. srcdir = .
  16.  
  17. CFLAGS = -g
  18. C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
  19. CXXFLAGS = -g
  20. CXX_FLAGS = $(CXXFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
  21. CC = gcc
  22. CXX = gcc
  23.  
  24. #### package, host, target, and site dependent Makefile fragments come in here.
  25. ##
  26.  
  27. STDIO_LD_FLAGS = -u __cleanup
  28.  
  29. #LIBS = ../../libg++.a
  30.  
  31. #LIBSTDIO = ../stdio/libstdio++.a
  32. #LIBIO = ../libio.a
  33.  
  34. #STDIOLIBS = $(STDIO_LD_FLAGS) $(LIBSTDIO) $(LIBIO) $(LIBS)
  35. STDIOLIBS = $(LIBSTDIO) $(LIBIO) $(LIBS)
  36. IOLIBS = ../libiostream.a ../../libiberty/libiberty.a
  37. IOSTDIOLIB = ../libio.a ../../libiberty/libiberty.a
  38.  
  39. DEPEND_SOURCES = $(srcdir)/*.C
  40.  
  41. .PHONY: check check-iostream check-stdio
  42. check: check-iostream check-iostdio
  43.  
  44.  
  45. # These are tests written in C++, that test the iostream facility.
  46. check-iostream: check-tFile check-hounddog check-putbackdog check-tiomanip
  47.  
  48. # These are tests written in C, that don't need C++.
  49. # They test libio's emulation of stdio.
  50. check-iostdio: check-tiformat check-tfformat 
  51.  
  52. # check-stdio runs test programs that use stdio.
  53. # These aren't run by default because there may be linker tricks needed
  54. # to build them (if libc.a contains a competing stdio implementation).
  55.  
  56. check-stdio: check-tfseek check-twrseek check-trdseek check-tpopen
  57.  
  58. .PHONY: info
  59. info:
  60. .PHONY: clean-info
  61. clean-info:
  62. .PHONY: install-info
  63. install-info:
  64.  
  65. tst: tst.o
  66.     gcc -v -o tst tst.o $(STDIOLIBS)
  67.  
  68. tgetl: tgetl.o
  69.     $(CXX) -o tgetl tgetl.o $(IOLIBS)
  70.  
  71. tFile: tFile.o
  72.     $(CXX) -o tFile tFile.o $(IOLIBS)
  73.  
  74. hounddog: hounddog.o
  75.     $(CXX) -o hounddog hounddog.o $(IOLIBS)
  76.  
  77. check-hounddog: hounddog
  78.     ./hounddog <$(srcdir)/hounddog.inp > hounddog.out 2>&1
  79.     diff -c hounddog.out $(srcdir)/hounddog.exp
  80.     ./hounddog -b0 <$(srcdir)/hounddog.inp > hound-b0.out 2>&1
  81.     diff -c hound-b0.out $(srcdir)/hounddog.exp
  82.     ./hounddog -b2 <$(srcdir)/hounddog.inp > hound-b2.out 2>&1
  83.     diff -c hound-b2.out $(srcdir)/hounddog.exp
  84.  
  85. putbackdog: putbackdog.o
  86.     $(CXX) -o putbackdog putbackdog.o $(IOLIBS)
  87.  
  88. check-putbackdog-regular: putbackdog
  89.     ./putbackdog <$(srcdir)/hounddog.inp > putback.out 2>&1
  90.     diff -c putback.out $(srcdir)/hounddog.exp
  91. check-putbackdog-nobuf: putbackdog
  92.     ./putbackdog -b0 <$(srcdir)/hounddog.inp > putback-b0.out 2>&1
  93.     diff -c putback-b0.out $(srcdir)/hounddog.exp
  94. check-putbackdog-buf2: putbackdog
  95.     ./putbackdog -b2 <$(srcdir)/hounddog.inp > putback-b2.out 2>&1
  96.     diff -c putback-b2.out $(srcdir)/hounddog.exp
  97. check-putbackdog: \
  98.   check-putbackdog-regular check-putbackdog-nobuf check-putbackdog-buf2
  99.  
  100. tfseek: tfseek.o
  101.     $(CC) -o tfseek tfseek.o $(STDIOLIBS)
  102.  
  103. check-tfseek: tfseek
  104.     ./tfseek SEEK_SET fopen > tfseek-set-fopen.out 2>&1
  105.     diff -c tfseek-set-fopen.out $(srcdir)/tfseek-set.exp
  106.     ./tfseek SEEK_SET freopen > tfseek-set-freopen.out 2>&1
  107.     diff -c tfseek-set-freopen.out $(srcdir)/tfseek-set.exp
  108.     ./tfseek SEEK_CUR fopen > tfseek-cur-fopen.out 2>&1
  109.     diff -c tfseek-cur-fopen.out $(srcdir)/tfseek-cur.exp
  110.     ./tfseek SEEK_CUR freopen > tfseek-cur-freopen.out 2>&1
  111.     diff -c tfseek-cur-freopen.out $(srcdir)/tfseek-cur.exp
  112.  
  113. twrseek: twrseek.o
  114.     $(CC) -o twrseek twrseek.o $(STDIOLIBS)
  115.  
  116. check-twrseek: twrseek
  117.     ./twrseek > twrseek.out 2>&1
  118.     diff -c twrseek.out $(srcdir)/twrseek.exp
  119.  
  120. trdseek: trdseek.o
  121.     $(CC) -o trdseek -v trdseek.o $(STDIOLIBS)
  122.  
  123. check-trdseek: trdseek
  124.     ./trdseek
  125.  
  126. check-tFile-regular: tFile
  127.     ./tFile < $(srcdir)/tFile.inp > tFile.out 2>&1
  128.     diff -c tFile.out $(srcdir)/tFile.exp
  129. # Run tFile with cout.rdbuf() unbuffered.
  130. check-tFile-nobuf: tFile
  131.     ./tFile -b0 < $(srcdir)/tFile.inp > tFile-buf0.out 2>&1
  132.     diff -c tFile-buf0.out $(srcdir)/tFile.exp
  133. # Run tFile with a 3-byte buffer for cout.rdbuf().
  134. check-tFile-buf3: tFile
  135.     ./tFile -b3 < $(srcdir)/tFile.inp > tFile-buf3.out 2>&1
  136.     diff -c tFile-buf3.out $(srcdir)/tFile.exp
  137. check-tFile: check-tFile-regular check-tFile-nobuf check-tFile-buf3
  138.  
  139. tiomanip: tiomanip.o
  140.     $(CXX) -o tiomanip tiomanip.o $(IOLIBS)
  141. check-tiomanip: tiomanip
  142.     ./tiomanip >tiomanip.out 2>&1
  143.     diff -c tiomanip.out $(srcdir)/tiomanip.exp
  144.  
  145. tfformat: tfformat.o
  146.     $(CC) $(C_FLAGS) -DTEST_LIBIO -DTEST_EXACTNESS \
  147.       -o tfformat $(srcdir)/tfformat.c $(IOSTDIOLIB)
  148.  
  149. check-tfformat: tfformat
  150.     ./tfformat
  151.  
  152. tiformat: $(srcdir)/tiformat.c
  153.     $(CC) $(C_FLAGS) -DTEST_LIBIO -o tiformat $(srcdir)/tiformat.c $(IOSTDIOLIB)
  154.  
  155. check-tiformat: tiformat
  156.     ./tiformat
  157.  
  158. tpopen: tpopen.o
  159.     $(CC) -o tpopen tpopen.o $(STDIOLIBS)
  160.  
  161. check-tpopen: tpopen
  162.     ./tpopen > tpopen.out 2>&1
  163.     diff -c tpopen.out $(srcdir)/tpopen.exp
  164.  
  165. trwseek: trwseek.o
  166.     $(CC) -o trwseek trwseek.o $(STDIOLIBS)
  167.  
  168. check-trwseek: trwseek
  169.     ./trwsseek  TMP r+ k w o
  170.  
  171. foo+: foo+.o
  172.     $(CXX) -o foo+ foo+.o $(IOLIBS)
  173.